package com.compty.paint.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 订单日志
 */
@Entity
@Table(name = "t_order_log")
public class OrderLog {

	private Integer id;
	private Order order;
	private Integer op_id;//操作者userId
	private String op_name;//操作者userName
	private String message;
	private Date op_time;

	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "op_id")
	public Integer getOp_id() {
		return op_id;
	}

	public void setOp_id(Integer opId) {
		op_id = opId;
	}

	@Column(name = "op_name", length = 50)
	public String getOp_name() {
		return op_name;
	}

	public void setOp_name(String opName) {
		op_name = opName;
	}

	@Column(name = "message", length = 200)
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="order_id")
	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	@Column(name = "op_time")
	public Date getOp_time() {
		return op_time;
	}

	public void setOp_time(Date opTime) {
		op_time = opTime;
	}
}
